import { type MockMethod } from 'vite-plugin-mock';
import MockJs from 'mockjs';
import { resultSuccess } from '../utils';

export default [
  {
    url: '/api/design/pageList',
    method: 'post',
    response: () => {
      const list = [];
      for (let i = 0; i <= 100; i++) {
        const title = MockJs.Random.ctitle(3, 20);
        list.push({
          id: MockJs.Random.guid(),
          title: title,
          titleExt: title,
          createTime: MockJs.Random.datetime(),
          creator: MockJs.Random.cname(),
          remark: MockJs.Random.ctitle(),
          image: MockJs.Random.image()
        });
      }
      return resultSuccess(list);
    }
  }
] as MockMethod[];
